﻿Imports CrystalCommon.View
Imports System.Configuration
Imports Crystal.CommonDBManagement

Public Class Home
    Inherits BaseForm

    Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
        Me.Close()
    End Sub

    Private Sub btnInvestorManagement_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnInvestorManagement.Click
        Dim frmInvestorManagements As frmInvestorManagement = New frmInvestorManagement()
        If CommonCLL.FocusOnExistingInstanceByName(frmInvestorManagements.Name) Then
            frmInvestorManagements.Show()
        End If
    End Sub

    Private Sub Home_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim login As New CrystalCommon.View.Login()
        login.ShowDialog()
        If CommonCLL.UserID = 0 Then
            Me.Close()
        End If
        SetControlProperties()
        BLLmdlCommon.UserId = CommonCLL.UserID
        BLLmdlCommon.UserName = CommonCLL.UserName
        BLLmdlCommon.strConfiguration = CommonCLL.mstrConnectionstring
    End Sub

    Private Sub SetControlProperties()
        Me.Text = TitleManager.GetTitle("Administration")
    End Sub

    Private Sub btnFundManagement_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFundManagement.Click
        Dim frmFun As FundManagement = New FundManagement()
        If CommonCLL.FocusOnExistingInstanceByName(frmFun.Name) Then
            frmFun.Text = "Crystal: Fund Management"
            frmFun.Show()
        End If
        'MessageBox.Show("Under development")
    End Sub

    Private Sub btnDeDupManagement_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDeDupManagement.Click
        Dim frm As frmAddEditLKPTable = New frmAddEditLKPTable()
        frm.Show()
        '    MessageBox.Show("Under development")
    End Sub
End Class